import { request } from 'umi';
//评论页面数据
export function getcommentList(payload: any) {
  let params = {
    page: payload.page,
    pageSize: 12,
    name: payload.name,
    email: payload.email,
    pass: payload.status,
  }
  return request(`/api/comment`, {
    params
  });
}

//评论通过&&拒绝
export function getCommentAdopt(obj:any){
  return request(`/api/comment/${obj.id}`,{
      method:"PATCH",
      data:{pass:obj.pass}
  })
}
//回复
export function getCommentreply(obj:object){
  return request(`/api/comment`,{
      method:"POST",
      data:obj
  })
}
//用户删除
export function getCommentDelet(id: any) {
  return request(`/api/comment/${id}`, {
    method: "DELETE"
  })
}

/* export function getCommentId(id: string) {
  return request(`/api/comment/${id}`, {
    method: 'PATCH',
  });
}
 */